<%@ page contentType="text/html;charset=UTF-8" language="java" %>
    <%@ page import="entity.Owner" %>
        <%@ page import="java.text.SimpleDateFormat" %>
            <html>

            <head>
                <title>业主详情</title>
                <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
                <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.1/font/bootstrap-icons.css"
                    rel="stylesheet">
                <style>
                    body {
                        background-color: #f8f9fa;
                        padding-top: 2rem;
                    }

                    .container {
                        max-width: 800px;
                    }

                    .info-item {
                        margin-bottom: 1rem;
                    }

                    .info-label {
                        font-weight: bold;
                        color: #6c757d;
                    }
                </style>
            </head>

            <body>
                <% Owner owner=(Owner) request.getAttribute("owner"); SimpleDateFormat sdf=new
                    SimpleDateFormat("yyyy-MM-dd"); %>

                    <div class="container">
                        <div class="d-flex align-items-center mb-4">
                            <a href="ownerManage.jsp" class="btn btn-outline-secondary me-3">
                                <i class="bi bi-arrow-left"></i> 返回
                            </a>
                            <h2>业主详情</h2>
                        </div>

                        <div class="card">
                            <div class="card-body">
                                <div class="info-item">
                                    <div class="info-label">姓名</div>
                                    <div>
                                        <%= owner.getName() %>
                                    </div>
                                </div>

                                <div class="info-item">
                                    <div class="info-label">联系电话</div>
                                    <div>
                                        <%= owner.getPhone() %>
                                    </div>
                                </div>

                                <div class="info-item">
                                    <div class="info-label">房间号</div>
                                    <div>
                                        <%= owner.getRoom() %>
                                    </div>
                                </div>

                                <div class="info-item">
                                    <div class="info-label">入住时间</div>
                                    <div>
                                        <%= owner.getCreateTime() !=null ? sdf.format(owner.getCreateTime()) : "" %>
                                    </div>
                                </div>

                            </div>
                        </div>
                    </div>

                    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
            </body>

            </html>